//`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company: 
// Engineer: 
// 
// Create Date: 2021/07/07 15:15:16
// Design Name: 
// Module Name: srl_shifter
// Project Name: 
// Target Devices: 
// Tool Versions: 
// Description: 
// 
// Dependencies: 
// 
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
// 
//////////////////////////////////////////////////////////////////////////////////


module srl_shifter(
    input [31:0] Adata,
    input [4:0] Bdata,
    output reg [31:0] srl_result
    );
    
    
always @(*)
begin
    case(Bdata)
            'd0:srl_result=Adata;
            'd1:srl_result={1'b0,Adata[31:1]};
            'd2:srl_result={2'b00,Adata[31:2]};
            'd3:srl_result={3'b000,Adata[31:3]};
            'd4:srl_result={4'b0000,Adata[31:4]};
            'd5:srl_result={5'b00000,Adata[31:5]};
            'd6:srl_result={6'b000000,Adata[31:6]};
            'd7:srl_result={7'b0000000,Adata[31:7]};
            'd8:srl_result={8'b00000000,Adata[31:8]};
            'd9:srl_result={9'b000000000,Adata[31:9]};
            'd10:srl_result={10'b0000000000,Adata[31:10]};
            'd11:srl_result={11'b00000000000,Adata[31:11]};
            'd12:srl_result={12'b000000000000,Adata[31:12]};
            'd13:srl_result={13'b0000000000000,Adata[31:13]};
            'd14:srl_result={14'b00000000000000,Adata[31:14]};
            'd15:srl_result={15'b000000000000000,Adata[31:15]};
            'd16:srl_result={16'b0000000000000000,Adata[31:16]};
            'd17:srl_result={17'b0000_0000_0000_00000,Adata[31:17]};
            'd18:srl_result={18'b0000_0000_0000_0000_00,Adata[31:18]};
            'd19:srl_result={19'b0000_0000_0000_0000_000,Adata[31:19]};
            'd20:srl_result={20'b0000_0000_0000_0000_0000,Adata[31:20]};
            'd21:srl_result={21'b0000_0000_0000_0000_0000_0,Adata[31:21]};
            'd22:srl_result={22'b0000_0000_0000_0000_0000_00,Adata[31:22]};
            'd23:srl_result={23'b0000_0000_0000_0000_0000_000,Adata[31:23]};
            'd24:srl_result={24'b0000_0000_0000_0000_0000_0000,Adata[31:24]};
            'd25:srl_result={25'b0000_0000_0000_0000_0000_0000_0,Adata[31:25]};
            'd26:srl_result={26'b0000_0000_0000_0000_0000_0000_00,Adata[31:26]};
            'd27:srl_result={27'b0000_0000_0000_0000_0000_0000_000,Adata[31:27]};
            'd28:srl_result={28'b0000_0000_0000_0000_0000_0000_0000,Adata[31:28]};
            'd29:srl_result={29'b0000_0000_0000_0000_0000_0000_0000_0,Adata[31:29]};
            'd30:srl_result={30'b0000_0000_0000_0000_0000_0000_0000_00,Adata[31:30]};
            'd31:srl_result={31'b0000_0000_0000_0000_0000_0000_0000_000,Adata[31]};
            default:srl_result=Adata;
        endcase
    end
endmodule
